package com.example.web.exception;

/**
 * <p>
 *
 * </p>
 *
 * @author 12071
 * @date 2022/8/1 17:05
 */
public class MyException extends RuntimeException{
    private Integer code;
    private final String message;
    @Override
    public String getMessage() {
        return message;
    }

    public MyException(String message, int code) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public MyException(Integer exceptionCode ,String msg) {
        this.code = exceptionCode;
        this.message = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
